package spitfire.ksim.util;

public class TStopWatch {
	private static long count = 0;
	private long startTime = -1;
  private long stopTime = -1;
  private long elapsedTime = -1;
  private long loop = 0;

  public void start() {
  	count++;
  	startTime = System.nanoTime();
  }
  
  public void stop() {
     stopTime = System.nanoTime();
     elapsedTime = stopTime-startTime;
  }

  public void print() {
     System.out.println("Elapsed time: "+elapsedTime);
  }
  
  public long getElapsedTime() {
  	return elapsedTime;
  }
  
  public long getCount() {
  	return count;
  }
  
  public void resetCount() {
  	count = 0;
  }
  
  public void setLoop(long x) {
  		loop = x;
  }
  
  public long getLoop() {
  	return loop;
  }
}
